﻿@using YiSha.Model;
@{
    Layout = null;
    YiSha.Entity.YiDongYuan.DetectionTaskEntity task = ViewBag.Task;
    YiSha.Entity.YiDongYuan.DetectionInfoEntity info = ViewBag.Info;
    YiSha.Entity.YiDongYuan.DetectionMechanicsEntity mechanics = ViewBag.Mechanics;
    YiSha.Entity.YiDongYuan.DetectionResultEntity result = ViewBag.Result;
}
@using YiSha.Entity.YiDongYuan;

<!DOCTYPE html>
<html>
<head>
    <title>非道路移动柴油机械排气烟度检验报告</title>

    <link href="~/lib/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />

    <style>
        table {
            border-collapse: collapse;
            width: 100%;
            margin-top: -1px;
        }

        th,
        td {
            border: 1px, solid, black;
            height: 30px;
            font-size: 10px;
        }

            th, td:empty {
                padding-left: 5px;
            }

        .border0 {
            border-style: hidden;
            height: 100%;
        }

        .page {
            width: 794px;
            /* width: 649px; */
            height: 1123px;
            /* height: 978px; */
            /* border: 1px solid red; */
        }

        .imgTitle {
            position: absolute;
            z-index: 101;
        }

        .remark {
            margin-top: 10px;
        }

        .imgDiv {
            width: 100%;
            height: 100%;
            position: relative;
        }
            /*里面的图片*/
            .imgDiv img {
                width: 100%;
                height: 100%;
                max-height: 250px;
                max-width: 240px;
            }
            /*字的共有属性   绝对定位  脱离文档  在父级内移动*/
            .imgDiv p {
                margin: 5px;
                font-size: 12px;
                color: red;
                position: absolute;
            }
                /*右下角字的移动轨迹*/
                .imgDiv p:nth-child(2) {
                    left: 40%;
                    top: 93%;
                }
    </style>
    <!-- 8.6*5.4 -->
    <script src="~/lib/jquery/2.1.4/jquery.min.js"></script>
</head>
<body>
    <div id="toolbar">
        <input type="button" value="打印" id="btnPrint" class="btn btn-primary" />
        @*<input type="button" value="查看检测视频" id="btnVideo" class="btn btn-success" />
            <input type="button" value="返回" onclick="history.go(-1);" class="btn btn-danger" />*@
    </div>
    <div id="divPrint">
        <div class="page" id="tit">
            <table>
                <tr>
                    <td colspan="4" style="text-align: center;">
                        <h3>非道路移动柴油机械排气烟度检验报告</h3>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: left;">
                        检验报告编号：@info.BillNo
                    </td>
                    <td style="text-align: left;">
                        检验日期：@task.DetectionTime.Value.ToString("yyyy-MM-dd")
                    </td>
                    <td style="text-align: left;">
                        计量认证号：200412051161
                    </td>
                    <td style="text-align: right;">
                        共 1 页 第 1 页
                    </td>
                </tr>
            </table>
            <table border="1">
                <tr>
                    <td colspan="5" style="text-align:center;"><b>非道路移动柴油机械基本信息</b></td>
                </tr>
                <tr>
                    <td width="15%">号牌号码</td>
                    <td colspan="3">@mechanics.HuanBaoCode</td>
                    <td rowspan="8" style="padding-left:0px;">
                        <div class="imgDiv">
                            <p>@info.BeginTime.Value.AddMinutes(1).ToString("yyyy/MM/dd HH:mm:ss") </p>
                            <p>大道源检测-@(info.XTBH)系统</p>
                            <img src="@Url.Content("https://jxhfd-api.sxxmlg.cn/File/Show?id="+mechanics.JX2_pic)" alt="">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td width="15%">机械类型</td>
                    <td width="20%">@mechanics.JXDJLX</td>
                    <td width="15%">机械名称</td>
                    <td width="20%">@mechanics.JXLB</td>
                </tr>
                <tr>
                    <td>机械型号</td>
                    <td>@mechanics.JXXH</td>
                    <td>机械环保码</td>
                    <td>@mechanics.JXHBDM</td>
                </tr>
                <tr>
                    <td>出厂年份</td>
                    <td>@mechanics.JXCCRQ</td>
                    <td>排放阶段</td>
                    <td>@mechanics.PFJD</td>
                </tr>
                <tr>
                    <td>生产厂名称</td>
                    <td>@mechanics.FDJZZQY</td>
                    <td>机械编码</td>
                    <td>@mechanics.JXCCBH</td>
                </tr>
                <tr>
                    <td>发动机型号</td>
                    <td>@mechanics.FDJBH</td>
                    <td>额定净功率/kW</td>
                    <td>@mechanics.FDJGL</td>
                </tr>
                <tr>
                    <td>额定转速/(r/min)</td>
                    <td>@mechanics.FDJZS</td>
                    <td>发动机后处理类型 </td>
                    <td>-</td>
                </tr>
                <tr>
                    <td>发动机制造厂名称</td>
                    <td colspan="3">@mechanics.FDJZZQY</td>
                </tr>
            </table>
            <table border="1">
                <tr>
                    <td colspan="5" style="text-align:center;"><b>所有人或代理人信息</b></td>
                </tr>
                <tr>
                    <td width="15%">姓名/单位</td>
                    <td width="35" colspan="2">@mechanics.OwnerName</td>
                    <td width="15%">联系电话</td>
                    <td>@mechanics.OwnerTel</td>
                </tr>
                <tr>
                    <td>联系地址 </td>
                    <td colspan="4">@mechanics.OwnerAddr</td>
                </tr>
                <tr>
                    <td>检测依据 </td>
                    <td colspan="4">
                        GB36886-2018《非道路移动柴油机械排气烟度限值及测量方法》
                    </td>
                </tr>
            </table>
            <table border="1">
                <tr>
                    <td colspan="8" style="text-align:center;"><b>环境参数</b></td>
                </tr>
                <tr>
                    <td width="12.5%">环境温度/℃</td>
                    <td width="12.5%">@info.Tmp</td>
                    <td width="12.5%">大气压/kPa</td>
                    <td width="12.5%">-</td>
                    <td width="12.5%"> 相对湿度 /%</td>
                    <td width="12.5%">@info.Hum</td>
                    <td width="12.5%">海拔高度/m </td>
                    <td>@info.Altitude</td>
                </tr>
            </table>
            <table border="1">
                <tr>
                    <td colspan="4" style="text-align:center;"><b>检测系统及设备信息</b></td>
                </tr>
                <tr>
                    <td width="20%">检测系统编号</td>
                    <td colspan="3">@info.XTBH</td>
                </tr>
                <tr>
                    <td width="20%">烟度计型号/名称</td>
                    <td width="30%">@info.YDJXH</td>
                    <td width="20%">烟度计出厂编号</td>
                    <td>@info.YDJBH</td>
                </tr>
                <tr>
                    <td>烟度计生产企业</td>
                    <td>@info.YDJCJ</td>
                    <td>烟度计检定日期</td>
                    <td>@(info.YDJJDRQ.HasValue?info.YDJJDRQ.Value.ToString("yyyy-MM-dd"):"")</td>
                </tr>
                <tr>
                    <td width="20%">转速仪名称/型号</td>
                    <td width="30%">@info.ZSYXH</td>
                    <td width="20%">转速仪出厂编号</td>
                    <td>@info.ZSYBH</td>
                </tr>
                <tr>
                    <td>转速仪生产企业</td>
                    <td>@info.ZSYCJ</td>
                    <td>转速仪检定日期</td>
                    <td>@(info.ZSYJDRQ.HasValue?info.ZSYJDRQ.Value.ToString("yyyy-MM-dd"):"")</td>
                </tr>
            </table>
            <table border="1">
                <tr>
                    <td colspan="4" style="text-align:center;"><b>排气污染物检测</b></td>
                </tr>
                <tr>
                    <td width="20%">检测方法</td>
                    <td width="30%">不透光烟度法 </td>
                    <td width="20%">执行限值类别</td>
                    <td>@info.ZXXZLB</td>
                </tr>
                <tr>
                    <td>
                        <table border="1" class="border0" style="text-align:center;">
                            <tr>
                                <td rowspan="2" width="30%">不透光<br />烟度法</td>
                                <td>自由加载</td>
                            </tr>
                            <tr><td>自由加速</td></tr>
                        </table>
                    </td>
                    <td colspan="2">
                        <table border="1" class="border0" style="text-align:center;">
                            <tr>
                                <td>烟度测量值/m<sup>-1</sup></td>
                                <td colspan="2">-</td>
                                <td>限值</td>
                            </tr>
                            <tr>
                                <td rowspan="2">
                                    实测转速/
                                    （r/min）
                                </td>
                                <td colspan="3">
                                    三次烟度值/m<sup>-1</sup>
                                </td>
                            </tr>
                            <tr>
                                <td>1</td>
                                <td>2</td>
                                <td>3</td>
                            </tr>
                            <tr>
                                <td>@result.Rpm1 --@result.Rpm2 --@result.Rpm3</td>
                                <td>@result.k1</td>
                                <td>@result.k2</td>
                                <td>@result.k3</td>
                            </tr>
                        </table>
                    </td>
                    <td>
                        <table border="1" class="border0" style="text-align:center;">
                            <tr>
                                <td colspan="3">-</td>
                            </tr>
                            <tr>
                                <td rowspan="2">
                                    平均值/m<sup>-1</sup>
                                </td>
                                <td rowspan="2">
                                    限值/m<sup>-1</sup>
                                </td>
                                <td rowspan="2">
                                    判定结果
                                </td>
                            </tr>
                            <tr></tr>
                            <tr>
                                <td>@result.accavg</td>
                                <td>@result.acclimits</td>
                                <td>@(result.testresult=="0"?"合格":"不合格")</td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>判定结论 </td>
                    <td>&nbsp;</td>
                    <td>检验起止时间</td>
                    <td>@info.BeginTime.ToString()  -  @info.EndTime.Value.ToString("HH:mm:ss")</td>
                </tr>
            </table>
            <table border="1">
                <tr>
                    <td width="13%">检验人员</td>
                    <td width="22%">@task.DetectionUserName</td>
                    <td width="13%">审核人员</td>
                    <td width="22%">张腾文</td>
                    <td width="13%">批准人员</td>
                    <td>相增峰</td>
                </tr>
                <tr>
                    <td>检测地点 </td>
                    <td colspan="5">@info.Address</td>
                </tr>
                <tr>
                    <td>检验机构名称</td>
                    <td>太原市大道源机动车检测有限公司</td>
                    <td>检验机构地址</td>
                    <td>太原市尖草坪区光社街办新店街2号</td>
                    <td>联系电话</td>
                    <td>15698691756</td>
                </tr>
                <tr>
                    <td colspan="6" style="padding:10px 5px;">
                        1、本报告对外发布时应同时加盖资质认定标志及检验检测专用章。<br />
                        2、本检测报告仅对受检机械检验时状态负责。<br />
                        3、本报告未经同意不得用于广告宣传。<br />
                        4、未经本机构批准，不得复制(全文复制除外)报告或证书。
                    </td>
                </tr>
            </table>
        </div>
    </div>

    <script>
        $(function () {
            $('img').click(function () {
                window.open(this.src);
            });
            $('img').error(function () {
                $(this).hide();
            });
            $(".nav_menu").hide();
            $("#btnPrint").click(function () {
                $("#toolbar").hide();
                window.print();
                $("#toolbar").show();
            });
            $("#btnVideo").click(function () {

            });
            $("th,td").each(function () {
                if ($(this).children("table").length == 0 && $(this).children(".imgDiv").length == 0) {
                    $(this).css("padding-left", "5px");
                }
                if ($(this).html() == '') {
                    $(this).html('-');
                }
            });
        });
    </script>
</body>
</html>